//
//  VideoStartTableViewCell.m
//  Tongcheng
//
//  Created by 邢广范 on 2017/4/7.
//  Copyright © 2017年 Tongcheng. All rights reserved.
//

#import "VideoStartTableViewCell.h"
#import "UIImageView+AFNetworking.h"

@interface VideoStartTableViewCell ()

@property (weak, nonatomic) IBOutlet UIImageView *avatarImageView;
@property (weak, nonatomic) IBOutlet UILabel *nameLabel;
@property (weak, nonatomic) IBOutlet UILabel *sexLabel;
@property (weak, nonatomic) IBOutlet UILabel *heightLabel;
@property (weak, nonatomic) IBOutlet UILabel *cityLabel;
@property (weak, nonatomic) IBOutlet UILabel *roseCountLabel;

@end

@implementation VideoStartTableViewCell

- (void)setModel:(VideoStartViewerListModel *)model
{
    _model = model;
    [self.avatarImageView setImageWithURL:[NSURL URLWithString:model.avatar] placeholderImage:nil];
    self.nameLabel.text = model.nicename;
    if ([model.sex isEqualToString:@"1"]) {
        self.sexLabel.text = [NSString stringWithFormat:@"♂%@", model.age];
    }else{
        self.sexLabel.text = [NSString stringWithFormat:@"♀%@", model.age];
    }
    self.heightLabel.text = [NSString stringWithFormat:@"%@cm", model.height];
    self.cityLabel.text = model.provinceid;
    self.roseCountLabel.text = model.roses;
}

- (void)awakeFromNib {
    [super awakeFromNib];
    self.sexLabel.layer.cornerRadius = 5;
    self.sexLabel.layer.masksToBounds = YES;
    self.sexLabel.layer.borderColor = RGB(0x93C5ED).CGColor;
    self.sexLabel.layer.borderWidth = 1;
    
    self.heightLabel.layer.cornerRadius = 5;
    self.heightLabel.layer.masksToBounds = YES;
    self.heightLabel.layer.borderWidth = 1;
    self.heightLabel.layer.borderColor = RGB(0xFDA953).CGColor;
    
    self.cityLabel.layer.cornerRadius = 5;
    self.cityLabel.layer.masksToBounds = YES;
    self.cityLabel.layer.borderColor = RGB(0xD5E5AD).CGColor;
    self.cityLabel.layer.borderWidth = 1;
    
    self.avatarImageView.layer.cornerRadius = 5;
    self.avatarImageView.layer.masksToBounds = YES;
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
